package starsservice.com.kc;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableEurekaClient
@EnableAsync
@MapperScan("com.baomidou.mybatisplus.samples.quickstart.mapper")
@EnableSwagger2
public class StarsServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(StarsServiceApplication.class, args);
    }

    @Bean
    public MapperScannerConfigurer mapperScannerConfigurer() {
        MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
        scannerConfigurer.setBasePackage("starsservice.com.kc.mapper");
        return scannerConfigurer;
    }
}
